package com.shitou.shitouorder.utils;

import org.apache.shiro.crypto.hash.Sha256Hash;

import com.shitou.shitoucommons.utils.TokenGenerator;
import java.util.UUID;

/**
 * class detail:
 *
 * @author 石头人
 */
@SuppressWarnings("all")
public class UUIDUtils {
    public static final String salt = TokenGenerator.generatorValue();
    public static String getUUID(){
        String replace = UUID.randomUUID().toString().replace("-", "");
        Sha256Hash sha256Hash = new Sha256Hash(replace, salt);
        return sha256Hash.toString();
    }

    public static void main(String[] args) {
        String uu = getUUID();
        System.out.println(uu.substring(0, 24));
    }
}
